﻿export default [
  {
    path: '/',
    component: '../layouts/BlankLayout', // 指定以下页面的布局
    routes: [
      {
        path: '/user', // 页面路由
        component: '../layouts/UserLayout',
        // component: '../layouts/MainLayout',
        routes: [
          {
            name: 'login',
            path: '/user/login',
            component: './User/login',
          },
          {
            name: 'login-home', // 标题
            path: '/user/home',
            component: './User/home2',
          },
          {
            name: 'login-home2', // 标题
            path: '/user/home2',
            component: './User/home2',
          },
          {
            name: 'login-home3', // 标题
            path: '/user/home3',
            component: './User/home',
          },
        ],
      },
      {
        path: '/main', // 主页
        component: '../layouts/MainLayout',
        routes: [
          {
            name: 'main-home',
            path: '/main/home',
            component: './Main/home',
          },
          {
            name: 'main-home2',
            path: '/main/home2',
            component: './Main/home2',
          },
          {
            name: 'main-home3',
            path: '/main/home3',
            component: './Main/home3',
          },
          {
            name: 'main-home4',
            path: '/main/home4',
            component: './Main/home4',
          },
        ],
      },
      {
        path: '/',
        // component: '../layouts/SecurityLayout',
        component: '../layouts/AdminSecurityLayout',
        routes: [
          {
            path: '/',
            // component: '../layouts/BasicLayout',
            component: '../layouts/AdminBasicLayout',
            authority: ['admin', 'user'],
            routes: [
              {
                path: '/',
                redirect: '/welcome',
              },
              {
                path: '/welcome',
                name: 'welcome',
                icon: 'smile',
                component: './Welcome',
              },
              // {
              //   path: '/home',
              //   name: 'welcome',
              //   icon: 'smile',
              //   component: './Welcome',
              // },
              {
                path: '/user-info',
                name: 'userInfo',
                icon: 'crown',
                // component: '@/layouts/AdminLayout',
                routes: [
                  {
                    path: '/user-info/list',
                    name: 'userList',
                    // icon: 'smile',
                    icon: 'table',
                    component: './TableUserList/',
                  },
                ],
              },
              {
                path: '/test',
                name: 'test',
                icon: 'smile',
                component: './User/test',
              },
              {
                path: '/admin',
                name: 'admin',
                icon: 'crown',
                component: './Admin',
                authority: ['admin'],
                routes: [
                  {
                    path: '/admin/sub-page',
                    name: 'sub-page',
                    icon: 'smile',
                    component: './Welcome',
                    authority: ['admin'],
                  },
                ],
              },
              {
                name: 'list.table-list',
                icon: 'table',
                path: '/list',
                component: './TableList',
              },
              {
                component: './404',
              },
            ],
          },
          {
            component: './404',
          },
        ],
      },
    ],
  },
  {
    component: './404',
  },
];
